import 'package:densefog/themes.dart';

class ThemeController {
  ThemeName _currentTheme;

  ThemeController.init() : _currentTheme = ThemeName.android;

  void _setTheme(ThemeName themeName) {
    _currentTheme = themeName;
  }

  void nextTheme() {
    if (_currentTheme.index < ThemeName.values.length - 1) {
      _setTheme(ThemeName.values[_currentTheme.index + 1]);
    } else {
      _setTheme(ThemeName.values[0]);
    }
  }

  PuzzleThemeData getThemeData() {
    return themes[_currentTheme]!;
  }
}
